[Unit]
Description=Elasticsearch
Documentation=https://www.elastic.co
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
User={{ es_user }}
Group={{ es_group }}
ExecStart={{ es_home }}/bin/elasticsearch
Restart=always
RestartSec=3
WorkingDirectory={{ es_home }}
StandardOutput=journal
StandardError=journal
LimitNOFILE=65536
LimitNPROC=4096
LimitMEMLOCK=infinity
TimeoutStopSec=180
KillSignal=SIGTERM
KillMode=process

[Install]
WantedBy=multi-user.target